package com.test.rabbitmq.direct;

public class DirectMain {

    public static void main(String[] args) {
        Thread tp = new Thread(new Publisher());
        try {
//            Thread.sleep(5 * 1000);
            tp.start();
            System.out.println("--------------------publish thread join.");
            tp.join();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("--------------------send over.");
        // consume start
        Thread tc1 = new Thread(new Consumer1());
        Thread tc2 = new Thread(new Consumer2());
        tc1.start();
        tc2.start();
    }
}
